package com.example.cms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.example.cms.entity.Customer;

@Repository
public interface CustomerDao {

	public List<Customer> getAllCusAndOr();//获取所有客户的所有订单信息
	
	public List<Customer> getAllCus();//获取所有客户信息
	
	public Integer getDataNum();//得到客户数据量
	
	public List<Customer> getAllCusBySize(@Param("pageNum") Integer pageNum ,@Param("pageSize") Integer pageSize);//获取所有客户信息(分页版本)
	
	public Customer getCusById(Integer id);//根据id查询客户信息
	
	public int addCus(Customer customer); //新增客户
	
	public int updateCus(Customer customer);//根据客户id修改客户信息
	
	public int deleteCus(Integer customerId);//根据id删除客户

    Customer selectCustomer(String CustomerPhone);

	public List<Customer> selectLikeCusName(@Param("customerName") String customerName,@Param("curr_page") Integer pageNum ,@Param("pageSize") Integer pageSize);

	public Integer slectLikeCusNum(@Param("customerName") String customerName);
	
}
